Source for file html4strict.php

Documentation is available at html4strict.php

  1. <?php
  2. /*************************************************************************************
  3.  * html4strict.php
  4.  * ---------------
  5.  * Author: Nigel McNie (nigel@geshi.org)
  6.  * Copyright: (c) 2004 Nigel McNie (http://qbnz.com/highlighter/)
  7.  * Release Version: 1.0.7.19
  8.  * Date Started: 2004/07/10
  9.  *
  10.  * HTML 4.01 strict language file for GeSHi.
  11.  *
  12.  * CHANGES
  13.  * -------
  14.  * 2005/12/28 (1.0.4)
  15.  *   -  Removed escape character for strings
  16.  * 2004/11/27 (1.0.3)
  17.  *   -  Added support for multiple object splitters
  18.  * 2004/10/27 (1.0.2)
  19.  *   -  Added support for URLs
  20.  * 2004/08/05 (1.0.1)
  21.  *   -  Added INS and DEL
  22.  *   -  Removed the background colour from tags' styles
  23.  * 2004/07/14 (1.0.0)
  24.  *   -  First Release
  25.  *
  26.  * TODO (updated 2004/11/27)
  27.  * -------------------------
  28.  * * Check that only HTML4 strict attributes are highlighted
  29.  * * Eliminate empty tags that aren't allowed in HTML4 strict
  30.  * * Split to several files - html4trans, xhtml1 etc
  31.  *
  32.  *************************************************************************************
  33.  *
  34.  *     This file is part of GeSHi.
  35.  *
  36.  *   GeSHi is free software; you can redistribute it and/or modify
  37.  *   it under the terms of the GNU General Public License as published by
  38.  *   the Free Software Foundation; either version 2 of the License, or
  39.  *   (at your option) any later version.
  40.  *
  41.  *   GeSHi is distributed in the hope that it will be useful,
  42.  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  43.  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  44.  *   GNU General Public License for more details.
  45.  *
  46.  *   You should have received a copy of the GNU General Public License
  47.  *   along with GeSHi; if not, write to the Free Software
  48.  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  49.  *
  50.  ************************************************************************************/
  51.  
  52. $language_data array (
  53.     'LANG_NAME' => 'HTML',
  54.     'COMMENT_SINGLE' => array(),
  55.     'COMMENT_MULTI' => array('<!--' => '-->'),
  56.     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  57.     'QUOTEMARKS' => array("'"'"'),
  58.     'ESCAPE_CHAR' => '',
  59.     'KEYWORDS' => array(
  60.         => array(
  61.             ),
  62.         => array(
  63.             '&lt;a&gt;''&lt;abbr&gt;''&lt;acronym&gt;''&lt;address&gt;''&lt;applet&gt;',
  64.             '&lt;a''&lt;abbr''&lt;acronym''&lt;address''&lt;applet',
  65.             '&lt;/a&gt;''&lt;/abbr&gt;''&lt;/acronym&gt;''&lt;/address&gt;''&lt;/applet&gt;',
  66.             '&lt;/a''&lt;/abbr''&lt;/acronym''&lt;/address''&lt;/applet',
  67.  
  68.             '&lt;base&gt;''&lt;basefont&gt;''&lt;bdo&gt;''&lt;big&gt;''&lt;blockquote&gt;''&lt;body&gt;''&lt;br&gt;''&lt;button&gt;''&lt;b&gt;',
  69.             '&lt;base''&lt;basefont''&lt;bdo''&lt;big''&lt;blockquote''&lt;body''&lt;br''&lt;button''&lt;b',
  70.             '&lt;/base&gt;''&lt;/basefont&gt;''&lt;/bdo&gt;''&lt;/big&gt;''&lt;/blockquote&gt;''&lt;/body&gt;''&lt;/br&gt;''&lt;/button&gt;''&lt;/b&gt;',
  71.             '&lt;/base''&lt;/basefont''&lt;/bdo''&lt;/big''&lt;/blockquote''&lt;/body''&lt;/br''&lt;/button''&lt;/b',
  72.  
  73.             '&lt;caption&gt;''&lt;center&gt;''&lt;cite&gt;''&lt;code&gt;''&lt;colgroup&gt;''&lt;col&gt;',
  74.             '&lt;caption''&lt;center''&lt;cite''&lt;code''&lt;colgroup''&lt;col',
  75.             '&lt;/caption&gt;''&lt;/center&gt;''&lt;/cite&gt;''&lt;/code&gt;''&lt;/colgroup&gt;''&lt;/col&gt;',
  76.             '&lt;/caption''&lt;/center''&lt;/cite''&lt;/code''&lt;/colgroup''&lt;/col',
  77.  
  78.             '&lt;dd&gt;''&lt;del&gt;''&lt;dfn&gt;''&lt;dir&gt;''&lt;div&gt;''&lt;dl&gt;''&lt;dt&gt;',
  79.             '&lt;dd''&lt;del''&lt;dfn''&lt;dir''&lt;div''&lt;dl''&lt;dt',
  80.             '&lt;/dd&gt;''&lt;/del&gt;''&lt;/dfn&gt;''&lt;/dir&gt;''&lt;/div&gt;''&lt;/dl&gt;''&lt;/dt&gt;',
  81.             '&lt;/dd''&lt;/del''&lt;/dfn''&lt;/dir''&lt;/div''&lt;/dl''&lt;/dt',
  82.  
  83.             '&lt;em&gt;',
  84.             '&lt;em',
  85.             '&lt;/em&gt;',
  86.             '&lt;/em',
  87.  
  88.             '&lt;fieldset&gt;''&lt;font&gt;''&lt;form&gt;''&lt;frame&gt;''&lt;frameset&gt;',
  89.             '&lt;fieldset''&lt;font''&lt;form''&lt;frame''&lt;frameset',
  90.             '&lt;/fieldset&gt;''&lt;/font&gt;''&lt;/form&gt;''&lt;/frame&gt;''&lt;/frameset&gt;',
  91.             '&lt;/fieldset''&lt;/font''&lt;/form''&lt;/frame''&lt;/frameset',
  92.  
  93.             '&lt;h1&gt;''&lt;h2&gt;''&lt;h3&gt;''&lt;h4&gt;''&lt;h5&gt;''&lt;h6&gt;''&lt;head&gt;''&lt;hr&gt;''&lt;html&gt;',
  94.             '&lt;h1''&lt;h2''&lt;h3''&lt;h4''&lt;h5''&lt;h6''&lt;head''&lt;hr''&lt;html',
  95.             '&lt;/h1&gt;''&lt;/h2&gt;''&lt;/h3&gt;''&lt;/h4&gt;''&lt;/h5&gt;''&lt;/h6&gt;''&lt;/head&gt;''&lt;/hr&gt;''&lt;/html&gt;',
  96.             '&lt;/h1''&lt;/h2''&lt;/h3''&lt;/h4''&lt;/h5''&lt;/h6''&lt;/head''&lt;/hr''&lt;/html',
  97.  
  98.             '&lt;iframe&gt;''&lt;ilayer&gt;''&lt;img&gt;''&lt;input&gt;''&lt;ins&gt;''&lt;isindex&gt;''&lt;i&gt;',
  99.             '&lt;iframe''&lt;ilayer''&lt;img''&lt;input''&lt;ins''&lt;isindex''&lt;i',
  100.             '&lt;/iframe&gt;''&lt;/ilayer&gt;''&lt;/img&gt;''&lt;/input&gt;''&lt;/ins&gt;''&lt;/isindex&gt;''&lt;/i&gt;',
  101.             '&lt;/iframe''&lt;/ilayer''&lt;/img''&lt;/input''&lt;/ins''&lt;/isindex''&lt;/i',
  102.  
  103.             '&lt;kbd&gt;',
  104.             '&lt;kbd',
  105.             '&t;/kbd&gt;',
  106.             '&lt;/kbd',
  107.  
  108.             '&lt;label&gt;''&lt;legend&gt;''&lt;link&gt;''&lt;li&gt;',
  109.             '&lt;label''&lt;legend''&lt;link''&lt;li',
  110.             '&lt;/label&gt;''&lt;/legend&gt;''&lt;/link&gt;''&lt;/li&gt;',
  111.             '&lt;/label''&lt;/legend''&lt;/link''&lt;/li',
  112.  
  113.             '&lt;map&gt;''&lt;meta&gt;',
  114.             '&lt;map''&lt;meta',
  115.             '&lt;/map&gt;''&lt;/meta&gt;',
  116.             '&lt;/map''&lt;/meta',
  117.  
  118.             '&lt;noframes&gt;''&lt;noscript&gt;',
  119.             '&lt;noframes''&lt;noscript',
  120.             '&lt;/noframes&gt;''&lt;/noscript&gt;',
  121.             '&lt;/noframes''&lt;/noscript',
  122.  
  123.             '&lt;object&gt;''&lt;ol&gt;''&lt;optgroup&gt;''&lt;option&gt;',
  124.             '&lt;object''&lt;ol''&lt;optgroup''&lt;option',
  125.             '&lt;/object&gt;''&lt;/ol&gt;''&lt;/optgroup&gt;''&lt;/option&gt;',
  126.             '&lt;/object''&lt;/ol''&lt;/optgroup''&lt;/option',
  127.  
  128.             '&lt;param&gt;''&lt;pre&gt;''&lt;p&gt;',
  129.             '&lt;param''&lt;pre''&lt;p',
  130.             '&lt;/param&gt;''&lt;/pre&gt;''&lt;/p&gt;',
  131.             '&lt;/param''&lt;/pre''&lt;/p',
  132.  
  133.             '&lt;q&gt;',
  134.             '&lt;q',
  135.             '&lt;/q&gt;',
  136.             '&lt;/q',
  137.  
  138.             '&lt;samp&gt;''&lt;script&gt;''&lt;select&gt;''&lt;small&gt;''&lt;span&gt;''&lt;strike&gt;''&lt;strong&gt;''&lt;style&gt;''&lt;sub&gt;''&lt;sup&gt;''&lt;s&gt;',
  139.             '&lt;samp''&lt;script''&lt;select''&lt;small''&lt;span''&lt;strike''&lt;strong''&lt;style''&lt;sub''&lt;sup''&lt;s',
  140.             '&lt;/samp&gt;''&lt;/script&gt;''&lt;/select&gt;''&lt;/small&gt;''&lt;/span&gt;''&lt;/strike&gt;''&lt;/strong&gt;''&lt;/style&gt;''&lt;/sub&gt;''&lt;/sup&gt;''&lt;/s&gt;',
  141.             '&lt;/samp''&lt;/script''&lt;/select''&lt;/small''&lt;/span''&lt;/strike''&lt;/strong''&lt;/style''&lt;/sub''&lt;/sup''&lt;/s',
  142.  
  143.             '&lt;table&gt;''&lt;tbody&gt;''&lt;td&gt;''&lt;textarea&gt;''&lt;text&gt;''&lt;tfoot&gt;''&lt;thead&gt;''&lt;th&gt;''&lt;title&gt;''&lt;tr&gt;''&lt;tt&gt;',
  144.             '&lt;table''&lt;tbody''&lt;td''&lt;textarea''&lt;text''&lt;tfoot''&lt;tfoot''&lt;thead''&lt;th''&lt;title''&lt;tr''&lt;tt',
  145.             '&lt;/table&gt;''&lt;/tbody&gt;''&lt;/td&gt;''&lt;/textarea&gt;''&lt;/text&gt;''&lt;/tfoot&gt;''&lt;/thead''&lt;/tfoot''&lt;/th&gt;''&lt;/title&gt;''&lt;/tr&gt;''&lt;/tt&gt;',
  146.             '&lt;/table''&lt;/tbody''&lt;/td''&lt;/textarea''&lt;/text''&lt;/tfoot''&lt;/tfoot''&lt;/thead''&lt;/th''&lt;/title''&lt;/tr''&lt;/tt',
  147.  
  148.             '&lt;ul&gt;''&lt;u&gt;',
  149.             '&lt;ul''&lt;u',
  150.             '&lt;/ul&gt;''&lt;/ul&gt;',
  151.             '&lt;/ul''&lt;/u',
  152.  
  153.             '&lt;var&gt;',
  154.             '&lt;var',
  155.             '&lt;/var&gt;',
  156.             '&lt;/var',
  157.  
  158.             '&gt;''&lt;'
  159.             ),
  160.         => array(
  161.             'abbr''accept-charset''accept''accesskey''action''align''alink''alt''archive''axis',
  162.             'background''bgcolor''border',
  163.             'cellpadding''cellspacing''char''char''charoff''charset''checked''cite''class''classid''clear''code''codebase''codetype''color''cols''colspan''compact''content''coords',
  164.             'data''datetime''declare''defer''dir''disabled',
  165.             'enctype',
  166.             'face''for''frame''frameborder',
  167.             'headers''height''href''hreflang''hspace''http-equiv',
  168.             'id''ismap',
  169.             'label''lang''language''link''longdesc',
  170.             'marginheight''marginwidth''maxlength''media''method''multiple',
  171.             'name''nohref''noresize''noshade''nowrap',
  172.             'object''onblur''onchange''onclick''ondblclick''onfocus''onkeydown''onkeypress''onkeyup''onload''onmousedown''onmousemove''onmouseout''onmouseover''onmouseup''onreset''onselect''onsubmit''onunload',
  173.             'profile''prompt',
  174.             'readonly''rel''rev''rowspan''rows''rules',
  175.             'scheme''scope''scrolling''selected''shape''size''span''src''standby''start''style''summary',
  176.             'tabindex''target''text''title''type',
  177.             'usemap',
  178.             'valign''value''valuetype''version''vlink''vspace',
  179.             'width'
  180.             )
  181.         ),
  182.     'SYMBOLS' => array(
  183.         '/''='
  184.         ),
  185.     'CASE_SENSITIVE' => array(
  186.         GESHI_COMMENTS => false,
  187.         => false,
  188.         => false,
  189.         => false,
  190.         ),
  191.     'STYLES' => array(
  192.         'KEYWORDS' => array(
  193.             => 'color: #b1b100;',
  194.             => 'color: #000000; font-weight: bold;',
  195.             => 'color: #000066;'
  196.             ),
  197.         'COMMENTS' => array(
  198.             'MULTI' => 'color: #808080; font-style: italic;'
  199.             ),
  200.         'ESCAPE_CHAR' => array(
  201.             => 'color: #000099; font-weight: bold;'
  202.             ),
  203.         'BRACKETS' => array(
  204.             => 'color: #66cc66;'
  205.             ),
  206.         'STRINGS' => array(
  207.             => 'color: #ff0000;'
  208.             ),
  209.         'NUMBERS' => array(
  210.             => 'color: #cc66cc;'
  211.             ),
  212.         'METHODS' => array(
  213.             ),
  214.         'SYMBOLS' => array(
  215.             => 'color: #66cc66;'
  216.             ),
  217.         'SCRIPT' => array(
  218.             => 'color: #00bbdd;',
  219.             => 'color: #ddbb00;',
  220.             => 'color: #009900;'
  221.             ),
  222.         'REGEXPS' => array(
  223.             )
  224.         ),
  225.     'URLS' => array(
  226.         => '',
  227.         => 'http://december.com/html/4/element/{FNAME}.html',
  228.         => ''
  229.         ),
  230.     'OOLANG' => false,
  231.     'OBJECT_SPLITTERS' => array(
  232.         ),
  233.     'REGEXPS' => array(
  234.         ),
  235.     'STRICT_MODE_APPLIES' => GESHI_ALWAYS,
  236.     'SCRIPT_DELIMITERS' => array(
  237.         => array(
  238.             '<!DOCTYPE' => '>'
  239.             ),
  240.         => array(
  241.             '&' => ';'
  242.             ),
  243.         => array(
  244.             '<' => '>'
  245.             )
  246.     ),
  247.     'HIGHLIGHT_STRICT_BLOCK' => array(
  248.         => false,
  249.         => false,
  250.         => true
  251.         )
  252. );
  253.  
  254. ?>

Documentation generated on Mon, 05 May 2008 16:20:14 +0400 by phpDocumentor 1.4.0